home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / basic / hugearr.zip / HUGEERAS.C < prev    next >
C/C++ Source or Header  |  1992-04-02  |  559b  |  27 lines

  1.  
  2. #define NOCOMM
  3. #include <windows.h>
  4.  
  5. #include "hugearr.h"
  6.  
  7. /* Erase a previously-dimensioned huge array. */
  8. /* VBM: Declare Function VBHugeErase% Lib "hugearr.dll" Alias "VBHugeErase" (ByVal hArray%) */
  9. int FAR PASCAL
  10. VBHugeErase(int hArray)
  11.     {
  12.     PHUGEDESC pArray;  /* pointer to array descriptor */
  13.  
  14.     DecCheckHandle(hArray);
  15.  
  16.     pArray = (PHUGEDESC) LocalLock(hLocalMem) + hArray;
  17.  
  18.     CheckNotAllocYet(pArray);
  19.  
  20.     /* free the memory */
  21.     GlobalFree(pArray -> handle);
  22.     pArray -> handle = NULL;
  23.  
  24.     LocalUnlock(hLocalMem);
  25.     return HA_OK;
  26.     }
  27.